package com.frogs.ucenter.v1.request;

import javax.servlet.http.HttpServletRequest;

import com.frogs.framework.util.StringUtil;
import com.frogs.framework.web.HttpRequestInfo;
import com.frogs.system.util.ApiUrlParamEnum;
import com.frogs.system.web.api.request.Request;
import com.frogs.system.web.exception.RequestIllegalException;

public class UserVerifyBindPhoneRequest extends Request{
	
	private String username;
	
	public UserVerifyBindPhoneRequest() {
	}
	
	@Override
	public void parse(HttpServletRequest request) {
		HttpRequestInfo requestInfo = new HttpRequestInfo(request);
		
		this.username = requestInfo.getParameter(ApiUrlParamEnum.username.getParamName(), "");
		if (StringUtil.isEmpty(username)) {
			throw new RequestIllegalException("账号不能为空");
		}
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

}
